package com.ktgj.customer.service.impl;

import java.util.List;
import com.ktgj.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ktgj.customer.mapper.BusinessOrderAssistMapper;
import com.ktgj.customer.domain.BusinessOrderAssist;
import com.ktgj.customer.service.IBusinessOrderAssistService;

/**
 * 购卡订单辅营产品Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-10-21
 */
@Service
public class BusinessOrderAssistServiceImpl implements IBusinessOrderAssistService 
{
    @Autowired
    private BusinessOrderAssistMapper businessOrderAssistMapper;

    /**
     * 查询购卡订单辅营产品
     * 
     * @param id 购卡订单辅营产品ID
     * @return 购卡订单辅营产品
     */
    @Override
    public BusinessOrderAssist selectBusinessOrderAssistById(Long id)
    {
        return businessOrderAssistMapper.selectBusinessOrderAssistById(id);
    }

    /**
     * 查询购卡订单辅营产品列表
     * 
     * @param businessOrderAssist 购卡订单辅营产品
     * @return 购卡订单辅营产品
     */
    @Override
    public List<BusinessOrderAssist> selectBusinessOrderAssistList(BusinessOrderAssist businessOrderAssist)
    {
        return businessOrderAssistMapper.selectBusinessOrderAssistList(businessOrderAssist);
    }

    /**
     * 新增购卡订单辅营产品
     * 
     * @param businessOrderAssist 购卡订单辅营产品
     * @return 结果
     */
    @Override
    public int insertBusinessOrderAssist(BusinessOrderAssist businessOrderAssist)
    {
        businessOrderAssist.setCreateTime(DateUtils.getNowDate());
        return businessOrderAssistMapper.insertBusinessOrderAssist(businessOrderAssist);
    }

    /**
     * 修改购卡订单辅营产品
     * 
     * @param businessOrderAssist 购卡订单辅营产品
     * @return 结果
     */
    @Override
    public int updateBusinessOrderAssist(BusinessOrderAssist businessOrderAssist)
    {
        return businessOrderAssistMapper.updateBusinessOrderAssist(businessOrderAssist);
    }

    /**
     * 批量删除购卡订单辅营产品
     * 
     * @param ids 需要删除的购卡订单辅营产品ID
     * @return 结果
     */
    @Override
    public int deleteBusinessOrderAssistByIds(Long[] ids)
    {
        return businessOrderAssistMapper.deleteBusinessOrderAssistByIds(ids);
    }

    /**
     * 删除购卡订单辅营产品信息
     * 
     * @param id 购卡订单辅营产品ID
     * @return 结果
     */
    @Override
    public int deleteBusinessOrderAssistById(Long id)
    {
        return businessOrderAssistMapper.deleteBusinessOrderAssistById(id);
    }
}
